//
//  GetLoginStatePlugin.m
//  PCDBankSix
//
//  Created by APPLE on 2023/8/24.
//

#import "GetLoginStatePlugin.h"

@implementation GetLoginStatePlugin

- (void)handler:(id)data andContext:(PCDContext *)context ResponseCallback:(WVJBResponseCallback )responseCallback{
      
    NSDictionary *dict = (NSDictionary *)data;
    NSString *strCallBack = dict[@"success"];
    if ([PCDUtil logined]) {
        NSDictionary *dict = @{@"mLoginStatus":@(YES)};
        evaluateJavaScriptOnMainThread(self, strCallBack, [dict JSONRepresentation]);
        
    }else{
        NSDictionary *dict = @{@"mLoginStatus":@(NO)};
        evaluateJavaScriptOnMainThread(self, strCallBack, [dict JSONRepresentation]);
    }
}

@end
